﻿@page "/BaseData/Ry/Details/{id}"
@using WTM.ViewModel.BaseData.RyVMs;
@inherits BasePage

<ValidateForm @ref="vform" Model="@Model" >
    <Row ItemsPerRow="ItemsPerRow.Two" RowType="RowType.Normal">

            <Display @bind-Value="@Model.Entity.Xh"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Xm"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Xb"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Mz"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Sfz"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Dz"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Zzmm"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Stjkqk"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Xueli"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Hyzk"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Rwsj"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Twsj"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Jntc"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Jyqk"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Cyqk"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Xqyx"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Zfqk"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Phone"   ShowLabel="true"/>
            <Display @bind-Value="@Model.Entity.Remark"   ShowLabel="true"/>
    </Row>
    <div class="modal-footer table-modal-footer">
        <Button Color="Color.Primary" Icon="fa fa-save" Text="@WtmBlazor.Localizer["Sys.Close"]" OnClick="OnClose" />
    </div>
</ValidateForm>

@code {

    private RyVM Model = null;
    private ValidateForm vform { get; set; }
    [Parameter]
    public string id { get; set; }


    protected override async Task OnInitializedAsync()
    {

        var rv = await WtmBlazor.Api.CallAPI<RyVM>($"/api/Ry/{id}");
        Model = rv.Data;
    }

    public void OnClose()
    {
        CloseDialog();
    }

}
